Part Number Hot Search : 
74AS573 033RDA1 BAV756 GBPC1516 SMC10 C3500 C8110 LN850RPX
Product Description
Full Text Search
 

To Download DS2788 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  general description the DS2788 measures voltage, temperature, and cur- rent, and estimates available capacity for rechargeable lithium-ion (li+) and li+ polymer batteries. cell charac- teristics and application parameters used in the calcu- lations are stored in on-chip eeprom. the available capacity registers report a conservative estimate of the amount of charge that can be removed given the cur- rent temperature, discharge rate, stored charge, and application parameters. capacity estimation is reported in mah remaining and percentage of full. led display drivers and a debounced input make dis- play of the capacity information easy. the led pins can directly sink current, requiring only a resistor for setting the current in the led display, thus reducing space and cost. applications power tools electric bicycles electric vehicles uninterruptible power supply digital cameras features ? five 30ma open-drain drivers for driving led fuel-gauge display ? debounced fuel-gauge display enable ? internal voltage measurement gain register for trimming external voltage-divider ? pin for driving fets to enable voltage-divider only during voltage measurement, conserving power ? precision voltage, temperature, and current measurement system ? accurate, temperature-stable, internal time base ? absolute and relative capacity estimated from coulomb count, discharge rate, temperature, and battery cell characteristics ? accurate warning of low battery conditions ? automatic backup of coulomb count and age estimation to nonvolatile (nv) eeprom ? gain and tempco calibration allows the use of low-cost sense resistors ? 24-byte battery/application parameter eeprom ? 16-byte user eeprom ? unique id and multidrop 1-wire interface ? 14-pin tssop package DS2788 stand-alone fuel-gauge ic with led display drivers ________________________________________________________________ maxim integrated products 1 2 11 pio 4 v dd 12 led5 3 dv ss 13 led4 led1 14 led3 1 led2 top view DS2788 8 vma 7 dq 9 sns 6 v ss 10 v in 5 ovd tssop + pin configuration ordering information rev 0; 10/07 for pricing, delivery, and ordering information, please contact maxim direct at 1-888-629-4642, or visit maxim? website at www.maxim-ic.com. + denotes a lead-free package. t&r = tape and reel. typical operating circuit appears at end of data sheet. part temp range pin-package DS2788e+ -25c to +70c 14 tssop DS2788e+t&r -25c to +70c 14 tssop 1-wire is a registered trademark of dallas semiconductor corp., a wholly owned subsidiary of maxim integrated products, inc.
DS2788 stand-alone fuel-gauge ic with led display drivers 2 _______________________________________________________________________________________ absolute maximum ratings recommended dc operating characteristics (v dd = 2.5v to 5.5v, t a = -25? to +70?, unless otherwise noted. typical values are at t a = +25?.) stresses beyond those listed under ?bsolute maximum ratings?may cause permanent damage to the device. these are stress rating s only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specificatio ns is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. voltage range on any pin relative to v ss.............. -0.3v to +6.0v voltage range on v in , vma relative to v ss ... -0.3v to v dd + 0.3v dv ss to v ss ..................................................................... -0.3v to +0.3v led1?.................................................................60ma each pin operating temperature range ...........................-40? to +85? storage temperature range .............................-55? to +125? soldering temperature (10s) ................refer to ipc/jedec-020 specification. parameter symbol conditions min typ max units supply voltage v dd (note 1) +2.5 +5.5 v v in , vma voltage range (note 1) 0 v dd v dq, pio, ovd, led1Cled5 voltage range (note 1) 0 +5.5 v dc electrical characteristics (v dd = 2.5v to 5.5v, t a = -25? to +70?, unless otherwise noted. typical values are at t a = +25?.) parameter symbol conditions min typ max units 2.5v  v dd  4.2v 70 95 active current i active 105 a sleep mode current i sleep 1 3 a input logic-high: dq, pio v ih (note 1) 1.5 v input logic-low: dq, pio v il (note 1) 0.6 v output logic-low: dq, pio, vma v ol i ol = 4ma (note 1) 0.4 v output logic-high: vma v oh i oh = 1ma (note 1) v dd - 0.5 v vma precharge time t pre 13.3 14.2 ms pulldown current: dq, pio i pd v dq , v pio = 0.4v 0.2 5 a output logic-low: led1Cled5 v ol i ol = -30ma (note 1) 1 v input logic-high: ovd v ih (note 1) v dd - 0.2 v input logic-low: ovd v il (note 1) v ss + 0.2 v v in input resistance r in 15 m  dq sleep timeout t sleep dq < v il 1.8 2.0 2.2 s undervoltage sleep threshold v sleep (note 1) 2.40 2.45 2.50 v pio switch debounce 100 130 ms led1 display blink rate 50% duty cycle 0.9 1.0 1.1 hz led display-on time 3.6 4.0 4.4 s
DS2788 stand-alone fuel-gauge ic with led display drivers _______________________________________________________________________________________ 3 electrical characteristics: temperature, voltage, current (v cc = 2.5v to 5.5v, t a = -25? to +70?, unless otherwise noted. typical values are at t a = +25?.) parameter symbol conditions min typ max units temperature resolution t lsb 0.125 c temperature error t err 3 c voltage resolution v lsb 4.88 mv voltage full-scale v fs 0 4.992 v voltage error v err 50 mv current resolution i lsb 1.56 v current full-scale i fs 51.2 mv current gain error i gerr (note 2) 1 % full scale current offset error i oerr 0c  t a  +70c, 2.5v  v dd  4.2v (notes 3, 4) -7.82 +12.5 v accumulated current offset q oerr 0c  t a  +70c, 2.5v  v dd  4.2v, v sns = v ss (notes 3, 4, 5) -188 0 vhr/ day v dd = 3.8v, t a = +25c 1 0c  t a  +70c, 2.5v  v dd  4.2v 2 timebase error t err 3 % electrical characteristics: 1-wire interface, standard (v cc = 2.5v to 5.5v, t a = -25? to +70?.) parameter symbol conditions min typ max units time slot t slot 60 120 s recovery time t rec 1 s write-0 low time t low0 60 120 s write-1 low time t low1 1 15 s read data valid t rdv 15 s reset-time high t rsth 480 s reset-time low t rstl 480 960 s presence-detect high t pdh 15 60 s presence-detect low t pdl 60 240 s
DS2788 stand-alone fuel-gauge ic with led display drivers 4 _______________________________________________________________________________________ note 1: all voltages are referenced to v ss . note 2: factory-calibrated accuracy. higher accuracy can be achieved by in-system calibration by the user. note 3: parameters guaranteed by design. note 4: at a constant regulated v dd voltage, the current offset bias register can be used to obtain higher accuracy. note 5: accumulation bias register set to 00h. note 6: eeprom data retention is 10 years at +50?. electrical characteristics: 1-wire interface, overdrive (v cc = 2.5v to 5.5v, t a = -25? to +70?.) parameter symbol conditions min typ max units time slot t slot 6 16 s recovery time t rec 1 s write-0 low time t low0 6 16 s write-1 low time t low1 1 2 s read data valid t rdv 2 s reset-time high t rsth 48 s reset-time low t rstl 48 80 s presence-detect high t pdh 2 6 s presence-detect low t pdl 8 24 s eeprom reliability specification (v cc = 2.5v to 5.5v, t a = -25? to +70?, unless otherwise noted. typical values are at t a = +25?.) parameter symbol conditions min typ max units eeprom copy time t eec 10 ms eeprom copy endurance n eec t a = +50c (note 6) 50,000 cycles
DS2788 stand-alone fuel-gauge ic with led display drivers _______________________________________________________________________________________ 5 pin description pin name function 1 led2 display driver. connect to an led connected to v dd for display of relative pack capacity. 2 led1 display driver. connect to an led connected to v dd for display of relative pack capacity. 3 dv ss display ground. ground connection for the led display drivers. connect to v ss . 4 v dd power-supply input. connect to the positive terminal of the battery cell through a decoupling network. 5 ovd 1-wire bus speed control. input logic level selects the speed of the 1-wire bus. logic 1 selects overdrive (ovd) and logic 0 selects standard (std) timing. on a multidrop bus, all devices must operate at the same speed. 6 v ss device ground. connect directly to the negative terminal of the battery cell. connect the sense resistor between v ss and sns. 7 dq data input/output. 1-wire data line, open-drain output driver. connect this pin to the data terminal of the battery pack. this pin has a weak internal pulldown (i pd ) for sensing pack disconnection from host or charger. 8 vma voltage measurement active. output is driven high before the start of a voltage conversion and driven low at the end of the conversion cycle. 9 sns sense resistor connection. connect to the negative terminal of the battery pack. connect the sense resistor between v ss and sns. 10 v in voltage sense input. the voltage of the battery cell is monitored through this input pin. 11 pio programmable i/o pin. can be configured as input or output to monitor or control user-defined external circuitry. output driver is open drain. this pin has a weak internal pulldown (i pd ). when configured as an input, upon recognition of a rising edge, the fuel-gauge display is enabled. 12 led5 display driver. connect to an led connected to v dd for display of relative pack capacity. leave floating in led4 configuration. 13 led4 display driver. connect to an led connected to v dd for display of relative pack capacity. 14 led3 display driver. connect to an led connected to v dd for display of relative pack capacity. status and control time base bias/vref 1-wire interface eeprom accumulated current current adc 15-bit + sign temp and voltage adc led drivers rate and temperature compensation en v por v dd pio dq ovd sns led5 led4 led3 led2 led1 dv ss vma v in v ss DS2788 figure 1. block diagram
DS2788 detailed description the DS2788 operates directly from 2.5v to 5.5v and supports single-cell li+ battery packs. as shown in figure 2, the DS2788 accommodates multicell applica- tions by adding a trim register for calibration of an external voltage-divider for v in . nv storage is provided for cell compensation and application parameters. host-side development of fuel-gauging algorithms is eliminated. on-chip algorithms and convenient status reporting of operating conditions reduce the serial polling required of the host processor. additionally, 16 bytes of eeprom memory are made available for the exclusive use of the host system and/or pack manufacturer. the additional eeprom memory can be used to facilitate battery lot and date tracking and nv storage of system or battery usage statistics. a 1-wire interface provides serial communication at the standard 16kbps or overdrive 140kbps speeds, allow- ing access to data registers, control registers, and user memory. a unique, factory-programmed, 64-bit regis- tration number (8-bit family code + 48-bit serial number + 8-bit crc) assures that no two parts are alike and enables absolute traceability. the 1-wire interface on the DS2788 supports multidrop capability so that multi- ple slave devices can be addressed with a single pin. power modes the DS2788 has two power modes: active and sleep. on initial power-up, the DS2788 defaults to active mode. while in active mode, the DS2788 is fully functional with measurements and capacity esti- mation continuously updated. in sleep mode, the DS2788 conserves power by disabling measurement and capacity estimation functions, but preserves regis- ter contents. sleep mode is entered under two differ- ent conditions and an enable bit for each condition makes entry into sleep optional. sleep mode can be enabled using the power mode (pmod) bit or the undervoltage enable (uven) bit. the pmod type sleep is entered if the pmod bit is set and dq is low for t sleep (2s nominal). the condition of dq low for t sleep can be used to detect a pack discon- stand-alone fuel-gauge ic with led display drivers 6 _______________________________________________________________________________________ DS2788 led1 led2 led3 led4 led5 dq sns pio v dd vma b3f-1000 150 5.6v bss84 2n7002 0.1 f 0.1 f 10 f 100k 10k 10k 900k protection circuit 10-cell li+ battery v in ovd dv ss v ss pk+ 330 330 330 330 330 leds data r sns 20m pk- max6765ttld2+ rst gnd out timeout in enable figure 2. multicell application example
nection or system shutdown, in which no charge or dis- charge current flows. a pmod sleep condition transi- tions back to active mode when dq is pulled high. the second option for entering sleep is an undervolt- age condition. when the uven bit is set, the DS2788 transitions to sleep if the voltage on v in is less than v sleep (2.45v nominal) and dq is stable at a low or high logic level for t sleep . an undervoltage condition occurs when a pack is fully discharged, where loading on the battery should be minimized. uven sleep relieves the battery of the i active load until communi- cation on dq resumes. note: pmod and uven sleep features must be dis- abled when a battery is charged on an external charger that does not connect to the dq pin. pmod sleep can be used if the charger pulls dq high. uven sleep can be used if the charger toggles dq. the DS2788 remains in sleep and therefore does not measure or accumulate current when a battery is charged on a charger that fails to properly drive dq. initiating communication in sleep when beginning communication with a DS2788 in pmod sleep, dq must be pulled up first and then a 1-wire reset pulse must be issued by the master. in uven sleep, the procedure depends on the state of dq when uven sleep was entered. if dq was low, dq must be pulled up and then a 1-wire reset pulse must be issued by the master as with pmod sleep. if dq was high when uven sleep was entered, then the DS2788 is prepared to receive a 1-wire reset from the master. in the first two cases with dq low during sleep, the DS2788 does not respond to the first rising edge of dq with a presence pulse. voltage measurement battery voltage is measured at the v in input with respect to v ss over a range of 0 to 4.992v, with a reso- lution of 4.88mv. the result is updated every 440ms and placed in the voltage (volt) register in two? com- plement form. voltages above the maximum register value are reported at the maximum value; voltages below the minimum register value are reported at the minimum value. figure 3 shows the format of the voltage register. v in is usually connected to the positive terminal of a single-cell li+ battery by a 1k resistor. the input impedance is sufficiently large (15m ) to be connected to a high-impedance voltage-divider in order to support multiple-cell applications. the pack voltage should be divided by the number of series cells to present a sin- gle-cell average voltage to the v in input. in figure 2, the value of r can be up to 1m without incurring sig- nificant error due to input loading. the vma pin is dri- ven high t pre before the voltage conversion begins. this allows an external switching element to enable the voltage-divider, and allows settling to occur before the start of the conversion. DS2788 stand-alone fuel-gauge ic with led display drivers _______________________________________________________________________________________ 7 volt read only msbaddress 0ch lsbaddress 0dh s 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 x x x x x msb lsb msb lsb s: sign bit(s), x: reserved units: 4.88mv figure 3. voltage register format
DS2788 temperature measurement the DS2788 uses an integrated temperature sensor to measure battery temperature with a resolution of 0.125?. temperature measurements are updated every 440ms and placed in the temperature (temp) register in two? complement form. figure 4 shows the format of the temperature register. current measurement in the active mode of operation, the DS2788 continu- ally measures the current flow into and out of the bat- tery by measuring the voltage drop across a low-value current-sense resistor, r sns . the voltage-sense range between sns and v ss is ?1.2mv. the input linearly converts peak signal amplitudes up to 102.4mv as long as the continuous signal level (average over the con- version cycle period) does not exceed ?1.2mv. the adc samples the input differentially at 18.6khz and updates the current (current) register at the com- pletion of each conversion cycle. the current register is updated every 3.515s with the current conversion result in two? complement form. charge currents above the maximum register value are reported at the maximum value (7fffh = +51.2mv). discharge currents below the minimum register value are reported at the minimum value (8000h = -51.2mv). stand-alone fuel-gauge ic with led display drivers 8 _______________________________________________________________________________________ temp read only msbaddress 0ah lsbaddress 0bh s 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 x x x x x msb lsb msb lsb s: sign bit(s), x: reserved units: 0.125 c figure 4. temperature register format current read only msbaddress 0eh lsbaddress 0fh s 2 14 2 13 2 12 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 msb lsb msb lsb s: sign bit(s) units: 1.5625v/r sns figure 5. current register format current resolution (1 lsb) r sns v ss - v sns 20m  15m  10m  5m  1.5625v 78.13a 104.2a 156.3a 312.5a
average current measurement the average current (iavg) register reports an aver- age current level over the preceding 28 seconds. the register value is updated every 28s in two? comple- ment form, and is the average of the eight preceding current register updates. figure 6 shows the format of the average current register. charge currents above the maximum register value are reported at the maxi- mum value (7fffh = +51.2mv). discharge currents below the minimum register value are reported at the minimum value (8000h = -51.2mv). current offset correction every 1024th conversion the adc measures its input offset to facilitate offset correction. offset correction occurs approximately once per hour. the resulting cor- rection factor is applied to the subsequent 1023 mea- surements. during the offset correction conversion, the adc does not measure the sense resistor signal. a maximum error of 1/1024 in the accumulated current (acr) register is possible; however, to reduce the error, the current measurement made just prior to the offset conversion is displayed in the current register and is substituted for the dropped current measure- ment in the current accumulation process. this results in an accumulated current error due to offset correction of less than 1/1024. current offset bias the current offset bias (cob) register allows a pro- grammable offset value to be added to raw current mea- surements. the result of the raw current measurement plus cob is displayed as the current measurement result in the current register, and is used for current accumulation. cob can be used to correct for a static offset error, or can be used to intentionally skew the cur- rent results and therefore the current accumulation. cob allows read and write access. whenever the cob is written, the new value is applied to all subsequent current measurements. cob can be programmed in 1.56? steps to any value between +198.1? and - 199.7?. the cob value is stored as a two? comple- ment value in nonvolatile memory. current measurement calibration the DS2788? current measurement gain can be adjusted through the rsgain register, which is factory- calibrated to meet the data sheet specified accuracy. rsgain is user accessible and can be reprogrammed after module or pack manufacture to improve the cur- rent measurement accuracy. adjusting rsgain can correct for variation in an external sense resistor? nom- inal value, and allows the use of low-cost, nonprecision DS2788 stand-alone fuel-gauge ic with led display drivers _______________________________________________________________________________________ 9 iavg read only msbaddress 08h lsbaddress 09h s 2 14 2 13 2 12 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 msb lsb msb lsb s: sign bit(s) units: 1.5625v/r sns figure 6. average current register format address 7bh s 2 6 2 5 2 4 2 3 2 2 2 1 2 0 msb lsb ?s?: sign bit(s) units: 1.56?/r sns figure 7. current offset bias register format cob r/w and ee
DS2788 current-sense resistors. rsgain is an 11-bit value stored in 2 bytes of the parameter eeprom memory block. the rsgain value adjusts the gain from 0 to 1.999 in steps of 0.001 (precisely 2 -10 ). the user must program rsgain cautiously to ensure accurate current measurement. when shipped from the factory, the gain calibration value is stored in two separate locations in the parameter eeprom block: rsgain, which is repro- grammable, and frsgain, which is read only. rsgain determines the gain used in the current measurement. the read-only frsgain (address b0h and b1h) is pro- vided to preserve the factory value only and is not used in the current measurement. sense resistor temperature compensation the DS2788 is capable of temperature compensating the current-sense resistor to correct for variation in a sense resistor? value over temperature. the DS2788 is factory programmed with the sense resistor temperature coefficient, rstc, set to zero, which turns off the tem- perature compensation function. rstc is user accessi- ble and can be reprogrammed after module or pack manufacture to improve the current accuracy when using a high temperature coefficient current-sense resistor. rstc is an 8-bit value stored in the parameter eeprom memory block. the rstc value sets the tem- perature coefficient from 0 to +7782ppm/? in steps of 30.5ppm/?. the user must program rstc cautiously to ensure accurate current measurement. temperature compensation adjustments are made when the temperature register crosses 0.5 c bound- aries. the temperature compensation is most effective with the resistor placed as close as possible to the v ss terminal to optimize thermal coupling of the resistor to the on-chip temperature sensor. if the current shunt is constructed with a copper pcb trace, run the trace under the DS2788 package if possible. current accumulation current measurements are internally summed, or accu- mulated, at the completion of each conversion period with the results displayed in the acr. the accuracy of the acr is dependent on both the current measure- ment and the conversion time base. the acr has a range of 0 to 409.6mvh with an lsb (least significant bit) of 6.25?h. additional read-only registers (acrl) hold fractional results of each accumulation to avoid truncation errors. accumulation of charge current above the maximum register value is reported at the maximum register value (7fffh); conversely, accumu- lation of discharge current below the minimum register value is reported at the minimum value (8000h). read and write access is allowed to the acr. the acr must be written msb (most significant byte) first, then lsb (least significant byte). the write must be complet- ed within 3.515s (one acr register update period). a write to the acr forces the adc to perform an offset correction conversion and update the internal offset correction factor. current measurement and accumula- tion begins with the second conversion following a write to the acr. writing the acr clears the fractional values in acrl. acr? format is shown in figure 8, and acrl? format is shown in figure 9. to preserve the acr value in case of power loss, the acr value is backed up to eeprom. the acr value is recovered from eeprom on power-up. see the memo- ry map in table 3 for specific address location and backup frequency. stand-alone fuel-gauge ic with led display drivers 10 ______________________________________________________________________________________ acr r/w and ee msbaddress 10h lsbaddress 11h 2 15 2 14 2 13 2 12 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 msb lsb msb lsb units: 6.25vh/r sns figure 8. accumulated current register (acr) format
current blanking the current blanking feature modifies the current mea- surement result prior to being accumulated in the acr. current blanking occurs conditionally when a current measurement (raw current + cob) falls in one of two defined ranges. the first range prevents charge cur- rents less than 100? from being accumulated. the second range prevents discharge currents less than 25? in magnitude from being accumulated. charge- current blanking is always performed, however, dis- charge-current blanking must be enabled by setting the nben bit in the control register. see the register description for additional information. accumulation bias the accumulation bias (ab) register allows an arbitrary bias to be introduced into the current-accumulation process. the ab can be used to account for currents that do not flow through the sense resistor, estimate currents too small to measure, estimate battery self-dis- charge, or correct for static offset of the individual DS2788 device. the ab register allows a user-pro- grammed positive or negative constant bias to be included in the current accumulation process. the user-programmed two? complement value, with bit weighting the same as the current register, is added to the acr once per current conversion cycle. the ab value is loaded on power-up from eeprom memory. figure 10 shows the format of the ab register. DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 11 acrl read only msbaddress 12h lsbaddress 13h 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 x x x x msb lsb msb lsb x: reserved units: 1.526nvhr/r sns figure 9. fractional/low accumulated current register (acrl) format acr lsb r sns v ss - v sns 20m  15m  10m  5m  6.25vh 312.5ah 416.7ah 625ah 1.250mah acr range r sns v ss - v sns 20m  15m  10m  5m  409.6mvh 20.48ah 27.30ah 40.96ah 81.92ah figure 10. accumulation bias register formats address 61h s 2 6 2 5 2 4 2 3 2 2 2 1 2 0 msb lsb ?s?: sign bit(s) units: 1.5625?/r sns ab ee
DS2788 capacity estimation algorithm remaining capacity estimation uses real-time measured values and stored parameters describing the cell char- acteristics and application operating limits. figure 11 describes the algorithm inputs and outputs. modeling cell stack characteristics to achieve reasonable accuracy in estimating remain- ing capacity, the cell stack performance characteristics over temperature, load current, and charge termination point must be considered. since the behavior of li+ cells is nonlinear, these characteristics must be includ- ed in the capacity estimation to achieve an acceptable level of accuracy in the capacity estimation. the fuelpack method used in the DS2788 is described in general in application note an131: lithium-ion cell fuel gauging with dallas semiconductor battery monitor ics . to facilitate efficient implementation in hardware, a modified version of the method outlined in an131 is used to store cell characteristics in the DS2788. full and empty points are retrieved in a lookup process that retraces piece-wise linear model consist- stand-alone fuel-gauge ic with led display drivers 12 ______________________________________________________________________________________ capacity lookup available capacity calculation acr housekeeping age estimator learn function voltage (r) full full(t) (r) active empty ae(t) (r) standby empty se(t) (r) remaining active absolute capacity (raac) mah (r) remaining standby absolute capacity (rsac) mah (r) remaining active relative capacity (rarc) % (r) remaining standby relative capacity (rsrc) % (r) temperature (r) current (r) average current (r) accumulated current (acr) (rw) age scalar (as) (1-byte ee) aging capacity (ac) (2 bytes ee) sense resistor prime (rsnsp) (1 -byte ee) charge voltage (vchg) (1-byte ee) minimum charge current (imin) (1-byte ee) active empty voltage (vae) (1-byte ee) active empty current (iae) (1-byte ee) cell parameters 16 bytes (eeprom) figure 11. top level algorithm diagram fuelpack is a trademark of dallas semiconductor corp., a wholly owned subsidiary of maxim integrated products, inc.
ing of three curves named full, active empty, and standby empty. each model curve is constructed with five line segments, numbered 1 through 5. above +50?, the segment 5 model curves extend infinitely with zero slope, approximating the nearly flat change in capacity of li+ cells at temperatures above +50?. segment 4 of each model curves originates at +50? on its upper end and extends downward in temperature to +25?. segment 3 joins with segment 2, which in turn joins with segment 1. segment 1 of each model curve extends from the junction with segment 2 to infi- nitely colder temperatures. segment slopes are stored as ?h ppm change per ?. the two junctions or break- points that join the segments (labeled tbp12 and tbp23 in figure 12) are programmable in 1? incre- ments from -128? to +25?. they are stored in two? complement format, tbp23 at 7ch, and tbp12 at 7dh. the slope or derivative for segments 1, 2, 3, and 4 are also programmable. full: the full curve defines how the full point of a given cell stack depends on temperature for a given charge termination. the charge termination method used in the application is used to determine the table values. the DS2788 reconstructs the full line from cell characteristic table values to determine the full capacity of the battery at each temperature. reconstruction occurs in one- degree temperature increments. full values are stored as ppm change per ?. for example, if a cell had a nominal capacity of 1214mah at +50?, a full value of 1199mah at +25?, and 1182mah at 0? (tbp23), the slope for segment 3 would be: ((1199mah - 1182mah) / (1214mah / 1m)) / (25? - 0?) = 560ppm/? 1 lsb of the slope registers equals 61ppm so the full segment 3 slope register (location 0x6dh) would be programmed with a value of 0x09h. each slope register has a dynamic range 0ppm to 15555ppm. DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 13 100% segment 1 derivative (ppm/ c) full active empty standby empty segment 2 segment 3 segment 4 +50 c +25 c tbp23 tbp12 segment 5 cell characterization cell characterization figure 12. cell model example diagram
DS2788 active empty: the active empty curve defines the tem- perature variation in the empty point of the discharge profile based on a high-level load current (one that is sustained during a high-power operating mode) and the minimum voltage required for system operation. this load current is programmed as the active empty current (iae), and should be a 3.5s average value to correspond to values read from the current register and the specified minimum voltage, or active empty voltage (vae) should be a 250ms average to corre- spond to values read from the voltage register. the DS2788 reconstructs the active empty line from cell characteristic table values to determine the active empty capacity of the battery at each temperature. reconstruction occurs in one-degree temperature increments. active empty segment slopes are stored the same as described for the full segments. standby empty: the standby empty curve defines the temperature variation in the empty point in the dis- charge defined by the application standby current and the minimum voltage required for standby operation. standby empty represents the point that the battery can no longer support a subset of the full application operation, such as memory data retention or organizer functions on a wireless handset. standby empty seg- ment slopes are stored the same as described for the full segments. the standby load current and voltage are used for determining the cell characteristics but are not pro- grammed into the DS2788. the DS2788 reconstructs the standby empty line from cell characteristic table values to determine the standby empty capacity of the battery at each temperature. reconstruction occurs in one-degree temperature increments. cell stack model construction the model is constructed with all points normalized to the fully charged state at +50?. the cell parameter eeprom block stores the initial values, the +50? full value in mvh units, and the +50? active empty value as a fraction of the +50? value. standby empty at +50? is by definition zero and therefore no storage is required. the slopes (derivatives) of the 4 segments for each model curve are also stored in the cell parameter eeprom block along with the break point temperatures of each segment. table 1 shows an example of data stored in this manner. stand-alone fuel-gauge ic with led display drivers 14 ______________________________________________________________________________________ table 1. example cell characterization table (normalized to +50?) temperature cell model parameters 15 bytes (eeprom) lookup function full(t) ae(t) se(t) figure 13. lookup function diagram manufacturers rated cell capacity: 1220mah charge voltage: 4.2v charge current: 500ma termination current: 50ma active empty (v, i): 3.0v, 500ma standby empty (v, i): 3.0v, 4ma sense resistor: 0.020  segment breakpoints tbp12 = -12c tbp23 = 0c calculated value +50 c nominal (mah) segment 1 (ppm/ c) segment 2 (ppm/ c) segment 3 (ppm/ c) segment 4 (ppm/ c) full 1214 488 549 1587 2686 active empty 854 1526 2686 3113 standby empty 244 183 916 244
application parameters in addition to cell model characteristics, several appli- cation parameters are needed to detect the full and empty points, as well as calculate results in mah units. sense resistor prime (rsnsp) rsnsp stores the value of the sense resistor for use in computing the absolute capacity results. the value is stored as a 1-byte conductance value with units of mhos. rsnsp supports resistor values of 1 to 3.922m . rsnsp is located in the parameter eeprom block. charge voltage (vchg) vchg stores the charge voltage threshold used to detect a fully charged state. the value is stored as a 1-byte voltage with units of 19.52mv and can range from 0 to 4.978v. vchg should be set marginally less than the cell voltage at the end of the charge cycle to ensure reliable charge termination detection. vchg is located in the parameter eeprom block. minimum charge current (imin) imin stores the charge current threshold used to detect a fully charged state. the value is stored as a 1-byte value with units of 50? and can range from 0 to 12.75mv. assuming rsns = 20m , imin can be pro- grammed from 0 to 637.5ma in 2.5ma steps. imin should be set marginally greater than the charge cur- rent at the end of the charge cycle to ensure reliable charge termination detection. imin is located in the parameter eeprom block. active empty voltage (vae) vae stores the voltage threshold used to detect the active empty point. the value is stored in 1 byte with units of 19.52mv and can range from 0 to 4.978v. vae is located in the parameter eeprom block. active empty current (iae) iae stores the discharge current threshold used to detect the active empty point. the unsigned value rep- resents the magnitude of the discharge current and is stored in 1 byte with units of 200? and can range from 0 to 51.2mv. assuming rsns = 20m , iae can be pro- grammed from 0ma to 2550ma in 10ma steps. iae is located in the parameter eeprom block. aging capacity (ac) ac stores the rated battery capacity used in estimating the decrease in battery capacity that occurs in normal use. the value is stored in 2 bytes in the same units as the acr (6.25?h). setting ac to the manufacturer? rated capacity sets the aging rate to approximately 2.4% per 100 cycles of equivalent full capacity dis- charges. partial discharge cycles are added to form equivalent full capacity discharges. the default estima- tion results in 88% capacity after 500 equivalent cycles. the estimated aging rate can be adjusted by setting ac to a different value than the cell manufacturer? rat- ing. setting ac to a lower value, accelerates the esti- mated aging. setting ac to a higher value retards the estimated aging. ac is located in the parameter eeprom block. age scalar (as) as adjusts the capacity estimation results downward to compensate for cell aging. as is a 1-byte value that represents values between 49.2% and 100%. the lsb is weighted at 0.78% (precisely 2 -7 ). a value of 100% (128 decimal or 80h) represents an unaged battery. a value of 95% is recommended as the starting as value at the time of pack manufacture to allow learning a larg- er capacity on batteries that have an initial capacity greater than the nominal capacity programmed in the cell characteristic table. as is modified by the cycle- count-based age estimation introduced above and by the capacity learn function. the host system has read and write access to as, however caution should be exercised when writing as to ensure that the cumula- tive aging estimate is not overwritten with an incorrect value. typically, it is not necessary for the host to write as because the DS2788 automatically saves as to eeprom on a periodic basis. (see the memory section for details.) the eeprom-stored value of as is recalled on power-up. capacity estimation utility functions aging estimation as previously discussed, the as register value is adjusted occasionally based on cumulative discharge. as the acr register decrements during each discharge cycle, an internal counter is incremented until equal to 32 times ac. as is then decremented by one, resulting in a decrease in the scaled full battery capacity of 0.78%. see the ac register description for recommen- dations on customizing the age estimation rate. learn function since li+ cells exhibit charge efficiencies near unity, the charge delivered to a li+ cell from a known empty point to a known full point is a dependable measure of the cell capacity. a continuous charge from empty to full results in a ?earn cycle.?first, the active empty point must be detected. the learn flag (learnf) is set at this point. second, once charging starts, the charge must DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 15
DS2788 continue uninterrupted until the battery is charged to full. upon detecting full, learnf is cleared, the charge- to-full (chgtf) flag is set, and the age scalar (as) is adjusted according to the learned capacity of the cell. acr housekeeping the acr register value is adjusted occasionally to maintain the coulomb count within the model curve boundaries. when the battery is charged to full (chgtf set), the acr is set equal to the age-scaled full lookup value at the present temperature. if a learn cycle is in progress, correction of the acr value occurs after the age scalar (as) is updated. when an empty condition is detected (aef or learnf set), the acr adjustment is conditional. if aef is set and learnf is not, the active empty point was not detected and the battery is likely below the active empty capacity of the model. the acr is set to the active empty model value only if it is greater than the active empty model value. if learnf is set, the battery is at the active empty point and the acr is set to the active empty model value. full detect full detection occurs when the voltage (volt) readings remain continuously above the vchg threshold for the period between two average current (iavg) readings, where both iavg readings are below imin. the two consecutive iavg readings must also be positive and nonzero. this ensures that removing the battery from the charger does not result in a false detection of full. full detect sets the charge-to-full (chgtf) bit in the status (status) register. active empty point detect active empty point detection occurs when the voltage register drops below the vae threshold and the two previous current readings are above iae. this captures the event of the battery reaching the active empty point. note that the two previous current readings must be negative and greater in magnitude than iae, that is, a larger discharge current than specified by the iae threshold. qualifying the voltage level with the dis- charge rate ensures that the active empty point is not detected at loads much lighter than those used to con- struct the model. also, active empty must not be detected when a deep discharge at a very light load is followed by a load greater than iae. either case would cause a learn cycle on the following charge-to-full to include part of the standby capacity in the measure- ment of the active capacity. active empty detection sets the learn flag bit (learnf) in status. result registers the DS2788 processes measurement and cell charac- teristics on a 3.5s interval and yields seven result regis- ters. the result registers are sufficient for direct display to the user in most applications. the host system can produce customized values for system use or user dis- play by combining measurement, result, and user eeprom values. full(t): the full capacity of the battery at the present temperature is reported normalized to the +50? full value. this 15-bit value reflects the cell model full value at the given temperature. full(t) reports values between 100% and 50% with a resolution of 61ppm (precisely 2 -14 ). though the register format permits val- ues greater than 100%, the register value is clamped to a maximum value of 100%. active empty, ae(t): the active empty capacity of the battery at the present temperature is reported normal- ized to the +50? full value. this 13-bit value reflects the cell model active empty at the given temperature. ae(t) reports values between 0% and 49.8% with a resolution of 61ppm (precisely 2 -14 ). standby empty, se(t): the standby empty capacity of the battery at the present temperature is reported nor- malized to the +50? full value. this 13-bit value reflects the cell model standby empty value at the cur- rent temperature. se(t) reports values between 0% and 49.8% with a resolution of 61ppm (precisely 2 -14 ). remaining active absolute capacity, raac [mah]: raac reports the capacity available under the current temperature conditions at the active empty discharge rate (iae) to the active empty point in absolute units of milliamp/hours (mah). raac is 16 bits. remaining standby absolute capacity, rsac [mah]: rsac reports the capacity available under the current temperature conditions at the standby empty discharge rate (ise) to the standby empty point capaci- ty in absolute units of mah. rsac is 16 bits. remaining active relative capacity, rarc [%]: rarc reports the capacity available under the current temperature conditions at the active empty discharge rate (iae) to the active empty point in relative units of percent. rarc is 8 bits. remaining standby relative capacity, rsrc [%]: rsrc reports the capacity available under the current temperature conditions at the standby empty discharge rate (ise) to the standby empty point capacity in rela- tive units of percent. rsrc is 8 bits. stand-alone fuel-gauge ic with led display drivers 16 ______________________________________________________________________________________
the status register contains bits that report the device status. the bits can be set internally by the DS2788. the chgtf, aef, sef, learnf, and ver bits are read-only bits that can be cleared by hardware. the uvf and porf bits can only be cleared through the 1- wire interface. DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 17 address 01h bit definition field bit format allowable values chgtf 7 read only charge termination flag set to 1 when: (volt > vchg) and (0 < iavg < imin) conti nuously for a period between two iavg register updates (28s to 56s). cleared to 0 when: rarc < 90% aef 6 read only active empty flag set to 1 when: volt < vae cleared to 0 when: rarc > 5% sef 5 read only standby empty flag set to 1 when: rsrc < 10% cleared to 0 when: rsrc > 15% learnf 4 read only learn flagwhen set to 1, a charge cycle can be used to learn battery capacity. set to 1 when: (volt falls from above vae to below vae) and (current > iae) cleared to 0 when: (chgtf = 1) or (current < 0) or (acr = 0**) or (acr written or recalled from eeprom) or (sleep entered). reserved 3 read only undefined uvf 2 read/write* undervoltage flag set to 1 when: volt < v sleep cleared to 0 by: user porf 1 read/write* power-on reset flaguseful for reset detection, see text below. set to 1 when: upon power-up by hardware. cleared to 0 by: user reserved 0 read only undefined *this bit can be set by the DS2788, and can only be cleared through the 1-wire interface. **learnf is only cleared if acr reaches 0 after volt < vae. figure 14. status register format calculation of results raac [mah] = (acr[mvh] - ae(t) full50[mvh]) rsnsp [mhos] rsac [mah] = (acr[mvh] - se(t) full50[mvh]) rsnsp [mhos] rarc [%] = 100% (acr[mvh] - ae(t) full50[mvh]) / {(as full(t) - ae(t)) full50[mvh]} rsrc [%] = 100% (acr[mvh] - se(t) full50[mvh]) / {(as full(t) - se(t)) full50[mvh]} status register
DS2788 all control register bits are read and write accessible. the control register is recalled from parameter eeprom memory at power-up. register bit values can be modified in shadow ram after power-up. shadow ram values can be saved as the power-up default val- ues by using the copy data command. stand-alone fuel-gauge ic with led display drivers 18 ______________________________________________________________________________________ control register address 60h bit definition field bit format allowable values nben 7 read/write negative blanking enable 0: allows negative current readings to always be accumulated. 1: enables blanking of negative current readings up to -25v. uven 6 read/write undervoltage sleep enable 0: disables transition to sleep mode based on v in voltage. 1: enables transition to sleep mode if v in < v sleep and dq are stable at either logic level for t sleep. pmod 5 read/write power mode enable 0: disables transition to sleep mode based on dq logic state. 1: enables transition to sleep mode if dq is at a logic-low for t sleep. rnaop 4 read/write read net address op code 0: read net address command = 33h. 1: read net address command = 39h. dc 3 read/write display control 0: enables led5 fuel-gauge display. 1: enables led4 fuel-gauge display. reserved 0:2 undefined figure 15. control register format
fuel-gauge display the DS2788 provides five open-drain drivers capable of sinking 30ma. these can be used to directly drive either 4 or 5 leds to display remaining active relative pack capacity (rarc). the leds are enabled when the pio is configured as an input and the pio pin rec- ognizes a rising edge. the display lights for 4s and then is disabled regardless of the state of the pio pin. further presses or releases of the pio pin after the 100ms debounce delay causes the display to be enabled (the display does not light continuously if the button is held down). table 2 summarizes how the leds are enabled. b sig- nifies that the led is blinking at a 50% duty cycle, 0.5s on, 0.5s off, to be repeated for the display time of 4s. l signifies the pin is pulled low, and the led is lit. x signi- fies the pin is high impedance, and the led is unlit. table 2. fuel-gauge display summary DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 19 special feature register address 15h bit definition field bit format allowable values reserved 1:7 undefined piosc 0 read/write pio sense and control read values: 0: pio pin  v il 1: pio pin  v ih write values: 0: activates pio pin open-drain output driver, forcing the pio pin low. 1: disables the output driver, allowing the pio pin to be pulled high or used as an input. power-up and sleep mode default: 1 (pio pin is high-z). note: pio pin has weak pulldown. figure 16. special feature register format all special feature register bits are read and write acces- sible, with default values specified in each bit definition. capacity 5 leds, dc: 0 led5Cled1 4 leds, dc: 1 led4Cled1 rarc  10 xxxxb xxxb 10 < rarc  20 xxxxl xxxl 20 < rarc  25 xxxll xxxl 25 < rarc  40 xxxll xxll 40 < rarc  50 xxlll xxll 50 < rarc  60 xxlll xlll 60 < rarc  75 xllll xlll 75 < rarc  80 xllll llll 80 < rarc  100 lllll llll
DS2788 the eeprom register provides access control of the eeprom blocks. eeprom blocks can be locked to pre- vent alteration of data within the block. locking a block disables write access to the block. once a block is locked, it cannot be unlocked. read access to eeprom blocks is unaffected by the lock/unlock status. stand-alone fuel-gauge ic with led display drivers 20 ______________________________________________________________________________________ eeprom register address 1fh bit definition field bit format allowable values eec 7 read only eeprom copy flag set to 1 when: copy data command executed. cleared to 0 when: copy data command completes. note: while eec = 1, writes to eeprom addresses are ignored. power-up default: 0 lock 6 read/write to 1 eeprom lock enable host write to 1: enables the lock command. host must issue lock command as next command after writing lock enable bit to 1. cleared to 0 when: lock command completes or when lock command is not the command issued immediately following the write command used to set the loc k enable bit. power-up default: 0 reserved 2:6 undefined bl1 1 read only eeprom block 1 lock flag (parameter eeprom 60hC7fh) 0: eeprom is not locked. 1: eeprom block is locked. factory default: 0 bl0 0 read only eeprom block 0 lock flag (user eeprom 20hC2fh) 0: eeprom is not locked. 1: eeprom block is locked. factory default: 0 figure 17. eeprom register format
memory the DS2788 has a 256-byte linear memory space with registers for instrumentation, status, and control, as well as eeprom memory blocks to store parameters and user information. byte addresses designated as ?eserved?return undefined data when read. reserved bytes should not be written. several byte registers are paired into two-byte registers in order to store 16-bit val- ues. the msb of the 16-bit value is located at a even address and the lsb is located at the next address (odd) byte. when the msb of a two-byte register is read, the msb and lsb are latched simultaneously and held for the duration of the read-data command to prevent updates to the lsb during the read. this ensures syn- chronization between the two register bytes. for consis- tent results, always read the msb and the lsb of a two-byte register during the same read data command sequence. eeprom memory consists of the nv eeprom cells over- laid with volatile shadow ram. the read data and write data commands allow the 1-wire interface to directly accesses only the shadow ram. the copy data and recall data function commands transfer data between the shadow ram and the eeprom cells. to modify the data stored in the eeprom cells, data must be written to the shadow ram and then copied to the eeprom. to verify the data stored in the eeprom cells, the eeprom data must be recalled to the shadow ram and then read from the shadow ram. user eeprom a 16-byte user eeprom memory (block 0, addresses 20h?fh) provides nv memory that is uncommitted to other DS2788 functions. accessing the user eeprom block does not affect the operation of the DS2788. user eeprom is lockable, and once locked, write access is not allowed. the battery pack or host system manufac- turer can program lot codes, date codes, and other manufacturing, warranty, or diagnostic information and then lock it to safeguard the data. user eeprom can also store parameters for charging to support different size batteries in a host device as well as auxiliary model data such as time to full charge estimation parameters. parameter eeprom model data for the cells and application operating parameters are stored in the parameter eeprom mem- ory (block 1, addresses 60h?fh). the acr (msb and lsb) and as registers are automatically saved to eep- rom when the rarc result crosses 4% boundaries. this allows the DS2788 to be located outside the pro- tection fets. in this manner, if a protection device is triggered, the DS2788 cannot lose more that 4% of charge or discharge data. DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 21 table 3. memory map address (hex) description read/write 00 reserved r 01 status: status register r/w 02 raac: remaining active absolute capacity msb r 03 raac: remaining active absolute capacity lsb r 04 rsac: remaining standby absolute capacity msb r 05 rsac: remaining standby absolute capacity lsb r 06 rarc: remaining active relative capacity r 07 rsrc: remaining standby relative capacity r 08 iavg: average current register msb r 09 iavg: average current register lsb r 0a temp: temperature register msb r 0b temp: temperature register lsb r 0c volt: voltage register msb r 0d volt: voltage register lsb r 0e current: current register msb r 0f current: current register lsb r 10 acr: accumulated current register msb r/w* 11 acr: accumulated current register lsb r/w*
DS2788 stand-alone fuel-gauge ic with led display drivers 22 ______________________________________________________________________________________ table 3. memory map (continued) address (hex) description read/write 12 acrl: low accumulated current register msb r 13 acrl: low accumulated current register lsb r 14 as: age scalar r/w* 15 sfr: special feature register r/w 16 full: full capacity msb r 17 full: full capacity lsb r 18 ae: active empty msb r 19 ae: active empty lsb r 1a se: standby empty msb r 1b se: standby empty lsb r 1c to 1e reserved 1f eeprom: eeprom register r/w 20 to 2f user eeprom, lockable, block 0 r/w 30 to 5f reserved 60 to 7f parameter eeprom, lockable, block 1 r/w 80 to ad reserved ae fvgain: factory voltage gain msb r af fvgain: factory voltage gain lsb r b0 frsgain: factory sense resistor gain msb r b1 frsgain: factory sense resistor gain lsb r b2 to ff reserved table 4. parameter eeprom memory block 1 address (hex) description address (hex) description 60 control: control register 70 ae segment 4 slope 61 ab: accumulation bias 71 ae segment 3 slope 62 ac: aging capacity msb 72 ae segment 2 slope 63 ac: aging capacity lsb 73 ae segment 1 slope 64 vchg: charge voltage 74 se segment 4 slope 65 imin: minimum charge current 75 se segment 3 slope 66 vae: active empty voltage 76 se segment 2 slope 67 iae: active empty current 77 se segment 1 slope 68 active empty 50 78 rsgain: sense resistor gain msb 69 rsnsp: sense resistor prime 79 rsgain: sense resistor gain lsb 6a full 50 msb 7a rstc: sense resistor temp coefficient 6b full 50 lsb 7b cob: current offset bias 6c full segment 4 slope 7c tbp23 6d full segment 3 slope 7d tbp12 6e full segment 2 slope 7e vgain: voltage gain msb 6f full segment 1 slope 7f vgain: voltage gain lsb *register value is automatically saved to eeprom during active mode operation and recalled from eeprom on power-up.
1-wire bus system the 1-wire bus is a system that has a single bus mas- ter and one or more slaves. a multidrop bus is a 1-wire bus with multiple slaves. a single-drop bus has only one slave device. in all instances, the DS2788 is a slave device. the bus master is typically a micro- processor in the host system. the discussion of this bus system consists of four topics: 64-bit net address, hardware configuration, transaction sequence, and 1-wire signaling. 64-bit net address each DS2788 has a unique, factory-programmed 1-wire net address that is 64 bits in length. the first eight bits are the 1-wire family code (32h for DS2788). the next 48 bits are a unique serial number. the last eight bits are a cyclic redundancy check (crc) of the first 56 bits (see figure 18). the 64-bit net address and the 1-wire i/o circuitry built into the device enable the DS2788 to communicate through the 1-wire protocol detailed in the 1-wire bus system section. crc generation the DS2788 has an 8-bit crc stored in the msb of its 1-wire net address. to ensure error-free transmission of the address, the host system can compute a crc value from the first 56 bits of the address and compare it to the crc from the DS2788. the host system is responsible for verifying the crc value and taking action as a result. the DS2788 does not compare crc values and does not prevent a command sequence from proceeding as a result of a crc mismatch. proper use of the crc can result in a communication channel with a very high level of integrity. the crc can be generated by the host using a circuit consisting of a shift register and xor gates as shown in figure 19, or it can be generated in software. additional information about the dallas 1-wire crc is available in application note 27: understanding and using cyclic redundancy checks with dallas semiconductor i button products ( www.maxim- ic.com/appnoteindex ). in the circuit in figure 19, the shift register bits are ini- tialized to 0. then, starting with the lsb of the family code, one bit at a time is shifted in. after the 8th bit of the family code has been entered, then the serial num- ber is entered. after the 48th bit of the serial number has been entered, the shift register contains the crc value. hardware configuration because the 1-wire bus has only a single line, it is important that each device on the bus be able to drive it at the appropriate time. to facilitate this, each device attached to the 1-wire bus must connect to the bus with open-drain or three-state output drivers. the DS2788 uses an open-drain output driver as part of the bidirectional interface circuitry shown in figure 20. if a bidirectional pin is not available on the bus master, DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 23 8-bit crc 48-bit serial number 8-bit family code (32h) msb lsb figure 18. 1-wire net address format msb xor xor xor input lsb figure 19. 1-wire crc generation block diagram i button is a registered trademark of dallas semiconductor corp., a wholly owned subsidiary of maxim integrated products, inc.
DS2788 separate output and input pins can be connected together. the 1-wire bus must have a pullup resistor at the bus- master end of the bus. for short line lengths, the value of this resistor should be approximately 5k . the idle state for the 1-wire bus is high. if, for any reason, a bus transaction must be suspended, the bus must be left in the idle state to properly resume the transaction later. if the bus is left low for more than 120 s (16 s for over- drive speed), slave devices on the bus begin to inter- pret the low period as a reset pulse, effectively terminating the transaction. the DS2788 can operate in two communication speed modes, standard and overdrive. the speed mode is determined by the input logic level of the ovd pin with a logic 0 selecting standard speed and a logic 1 selecting overdrive speed. the ovd pin must be at a stable logic level of 0 or 1 before initializing a transac- tion with a reset pulse. all 1-wire devices on a multin- ode bus must operate at the same communication speed for proper operation. 1-wire timing for both stan- dard and overdrive speeds are listed in the electrical characteristics: 1-wire interface tables. transaction sequence the protocol for accessing the DS2788 through the 1-wire port is as follows: initialization net address command function command transaction/data the sections that follow describe each of these steps in detail. all transactions of the 1-wire bus begin with an initial- ization sequence consisting of a reset pulse transmitted by the bus master, followed by a presence pulse simul- taneously transmitted by the DS2788 and any other slaves on the bus. the presence pulse tells the bus master that one or more devices are on the bus and ready to operate. for more details, see the 1-wire signaling section. net address commands once the bus master has detected the presence of one or more slaves, it can issue one of the net address com- mands described in the following paragraphs. the name of each rom command is followed by the 8-bit op code for that command in square brackets. figure 21 presents a transaction flowchart of the net address commands. read net address [33h or 39h]. this command allows the bus master to read the DS2788? 1-wire net address. this command can only be used if there is a single slave on the bus. if more than one slave is pre- sent, a data collision occurs when all slaves try to trans- mit at the same time (open drain produces a wired-and result). the rnaop bit in the status register selects the op code for this command, with rnaop = 0 indicating 33h and rnaop = 1 indicating 39h. stand-alone fuel-gauge ic with led display drivers 24 ______________________________________________________________________________________ rx bus master rx = receive tx = transmit 4.7k 0.2 a (typ) v pullup (2.0v to 5.5v) tx rx tx 100 mosfet DS2788 1-wire port figure 20. 1-wire bus interface circuitry
match net address [55h]. this command allows the bus master to specifically address one DS2788 on the 1-wire bus. only the addressed DS2788 responds to any subsequent function command. all other slave devices ignore the function command and wait for a reset pulse. this command can be used with one or more slave devices on the bus. skip net address [cch]. this command saves time when there is only one DS2788 on the bus by allowing the bus master to issue a function command without specifying the address of the slave. if more than one slave device is present on the bus, a subsequent func- tion command can cause a data collision when all slaves transmit data at the same time. search net address [f0h]. this command allows the bus master to use a process of elimination to identify the 1-wire net addresses of all slave devices on the bus. the search process involves the repetition of a simple three-step routine: read a bit, read the comple- ment of the bit, then write the desired value of that bit. the bus master performs this simple three-step routine on each bit location of the net address. after one com- plete pass through all 64 bits, the bus master knows the address of one device. the remaining devices can then be identified on additional iterations of the process. see chapter 5 of the book of i button standards for a comprehensive discussion of a net address search, including an actual example ( www.maxim-ic.com/ibuttonbook ). resume [a5h]. this command increases data through- put in multidrop environments where the DS2788 needs to be accessed several times. resume is similar to the skip net address command in that the 64-bit net address does not have to be transmitted each time the DS2788 is accessed. after successfully executing a match net address command or search net address command, an internal flag is set in the DS2788. when the flag is set, the DS2788 can be repeatedly accessed through the resume command function. accessing another device on the bus clears the flag, thus prevent- ing two or more devices from simultaneously respond- ing to the resume command function. function commands after successfully completing one of the net address commands, the bus master can access the features of the DS2788 with any of the function commands described in the following paragraphs. the name of each function is followed by the 8-bit op code for that command in square brackets. table 5 summarizes the function commands. read data [69h, xx]. this command reads data from the DS2788 starting at memory address xx. the lsb of the data in address xx is available to be read immedi- ately after the msb of the address has been entered. because the address is automatically incremented after the msb of each byte is received, the lsb of the data at address xx + 1 is available to be read immediately after the msb of the data at address xx. if the bus mas- ter continues to read beyond address ffh, data is read starting at memory address 00 and the address is auto- matically incremented until a reset pulse occurs. addresses labeled ?eserved?in the memory map contain undefined data values. the read data com- mand can be terminated by the bus master with a reset pulse at any bit boundary. reads from eeprom block addresses return the data in the shadow ram. a recall data command is required to transfer data from the eeprom to the shadow. see the memory section for more details. write data [6ch, xx]. this command writes data to the DS2788 starting at memory address xx. the lsb of the data to be stored at address xx can be written immedi- ately after the msb of address has been entered. because the address is automatically incremented after the msb of each byte is written, the lsb to be stored at address xx + 1 can be written immediately after the msb to be stored at address xx. if the bus master con- tinues to write beyond address ffh, the data starting at address 00 is overwritten. writes to read-only address- es, reserved addresses, and locked eeprom blocks are ignored. incomplete bytes are not written. writes to unlocked eeprom block addresses modify the shad- ow ram. a copy data command is required to transfer data from the shadow to the eeprom. see the memory section for more details. DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 25
DS2788 copy data [48h, xx]. this command copies the con- tents of the eeprom shadow ram to eeprom cells for the eeprom block containing address xx. copy data commands that address locked blocks are ignored. while the copy data command is executing, the eec bit in the eeprom register is set to 1 and writes to eeprom addresses are ignored. reads and writes to non-eeprom addresses can still occur while the copy is in progress. the copy data command takes t eec time to execute, starting on the next falling edge after the address is transmitted. recall data [b8h, xx]. this command recalls the con- tents of the eeprom cells to the eeprom shadow memory for the eeprom block containing address xx. lock [6ah, xx]. this command locks (write protects) the block of eeprom memory containing memory address xx. the lock bit in the eeprom register must be set to 1 before the lock command is executed. to help prevent unintentional locks, one must issue the lock command immediately after setting the lock bit (eeprom register, address 1fh, bit 06) to a 1. if the lock bit is 0 or if setting the lock bit to 1 does not imme- diately precede the lock command, the lock command has no effect. the lock command is permanent; a locked block can never be written again. stand-alone fuel-gauge ic with led display drivers 26 ______________________________________________________________________________________ table 5. function commands command description command protocol bus state after command protocol bus data read data reads data from memory starting at address xx. 69h, xx master rx up to 256 bytes of data write data writes data to memory starting at address xx. 6ch, xx master tx up to 256 bytes of data copy data copies shadow ram data to eeprom block containing address xx. 48h, xx master reset none recall data recalls eeprom block containing address xx to ram. b8h, xx master reset none lock permanently locks the block of eeprom containing address xx. 6ah, xx master reset none
DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 27 DS2788 tx presence pulse master tx net address command master tx reset pulse DS2788 tx bit 0 DS2788 tx bit 0 master tx bit 0 33h/39h read DS2788 tx family code 1 byte yes no clear resume master tx function command no yes no no no no no no DS2788 tx serial number 6 bytes set resume flag DS2788 tx crc 1 byte 55h match yes clear resume master tx bit 0 master tx bit 1 no yes yes bit o match? yes bit o match? master tx bit 63 bit 1 match? bit 1 match? f0h search yes cch skip yes clear resume master tx function command master tx function command a5h resume yes yes resume flag set? yes bit 1 match? DS2788 tx bit 1 DS2788 tx bit 1 master tx bit 1 DS2788 tx bit 63 DS2788 tx bit 63 master tx bit 63 no no figure 21. net address command flowchart
DS2788 1-wire signaling the 1-wire bus requires strict signaling protocols to ensure data integrity. the four protocols used by the DS2788 are as follows: the initialization sequence (reset pulse followed by presence pulse), write-0, write-1, and read data. all these types of signaling except the pres- ence pulse are initiated by the bus master. figure 22 shows the initialization sequence required to begin any communication with the DS2788. a presence pulse following a reset pulse indicates that the DS2788 is ready to accept a net address command. the bus master transmits (tx) a reset pulse for t rstl . the bus master then releases the line and goes into receive mode (rx). the 1-wire bus line is then pulled high by the pullup resistor. after detecting the rising edge on the dq pin, the DS2788 waits for t pdh and then trans- mits the presence pulse for t pdl . write-time slots a write-time slot is initiated when the bus master pulls the 1-wire bus from a logic-high (inactive) level to a logic-low level. there are two types of write-time slots: write-1 and write-0. all write-time slots must be t slot in duration with a 1? minimum recovery time, t rec , between cycles. the DS2788 samples the 1-wire bus line between 15? and 60? (between 2? and 6? for overdrive speed) after the line falls. if the line is high when sampled, a write-1 occurs. if the line is low when sampled, a write-0 occurs (see figure 23). for the bus master to generate a write-1 time slot, the bus line must be pulled low and then released, allowing the line to be pulled high within 15? (2? for overdrive speed) after the start of the write-time slot. for the host to generate a write-0 time slot, the bus line must be pulled low and held low for the duration of the write-time slot. read-time slots a read-time slot is initiated when the bus master pulls the 1-wire bus line from a logic-high level to a logic-low level. the bus master must keep the bus line low for at least 1? and then release it to allow the DS2788 to present valid data. the bus master can then sample the data t rdv from the start of the read-time slot. by the end of the read-time slot, the DS2788 releases the bus line and allows it to be pulled high by the external pullup resistor. all read-time slots must be t slot in duration with a 1? minimum recovery time, t rec , between cycles. see figure 23 for more information. stand-alone fuel-gauge ic with led display drivers 28 ______________________________________________________________________________________ resistor pullup bus master active low line type legend: dq DS2788 active low pk+ pk- t rstl t rsth t pdl t pdh figure 22. 1-wire initialization sequence
DS2788 stand-alone fuel-gauge ic with led display drivers ______________________________________________________________________________________ 29 resistor pullup bus master active low line type legend: DS2788 active low both bus master and DS2788 active low t slot t low0 t rec t rec t low > 1 s > 1 s t slot t rd t rd t slot 30 s 15 s 15 s 3 s 2 s 1 s 3 s 2 s 1 s 30 s 15 s 15 s t slot v pullup write-0 slot write-1 slot read-0 slot read-1 slot gnd v pullup gnd master sample window master sample window mode: standard overdrive DS2788 sample window min typ max DS2788 sample window min typ max figure 23. 1-wire write- and read-time slots
DS2788 stand-alone fuel-gauge ic with led display drivers maxim cannot assume responsibility for use of any circuitry other than circuitry entirely embodied in a maxim product. no circu it patent licenses are implied. maxim reserves the right to change the circuitry and specifications without notice at any time. 30 ____________________maxim integrated products, 120 san gabriel drive, sunnyvale, ca 94086 408-737-7600 2007 maxim integrated products is a registered trademark of maxim integrated products, inc. DS2788 led1 led2 led3 led4 led5 dq sns pio v dd vma display 150 5.6v (n ?1) r 0.1 fr 5v regulator protection circuit n-cell li+ battery v in ovd dv ss v ss pk+ data r sns pk- typical operating circuit package information (for the latest package outline information, go to www.maxim-ic.com/dallaspackinfo .) package type document no. 14 tssop 56-g2015-000


▲Up To Search▲   

 
Price & Availability of DS2788

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X